import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

// 引入element
import '@/config/element.js';
// import ElementUI from "element-ui";
// import "element-ui/lib/theme-chalk/index.css";
// Vue.use(ElementUI);

// ajax
import { post, fetch } from './config/axios'
import axios from "axios";
Vue.prototype.axios = axios;
Vue.prototype.baseUrl = process.env.VUE_APP_BASEURL;
Vue.prototype.grantUrl = process.env.VUE_APP_GRANTURL;  // 迁移
Vue.prototype.nodetUrl = process.env.VUE_APP_AUHORIZE;  // 授权
Vue.prototype.$get = fetch;
Vue.prototype.$post = post;

// dayjs 日期处理
import dayjs from 'dayjs'
Vue.prototype.dayjs = dayjs

// layer提示 -- 非必须
import 'vue-layer/lib/vue-layer.css';
import layer from 'vue-layer';
Vue.prototype.$layer = layer(Vue, { msgtime: 2.5 });

// base64加密
// import {Base64} from 'js-base64'
// Vue.use(Base64);
// 全局注册指令 -- 非必须
import Directives from './directives/main.js'
Vue.use(Directives)

Vue.config.productionTip = false;
new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
